arm: fix build with gcc 7
authorJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:12:08 +0000 (10:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:12:08 +0000 (10:12 +0200)
commit9d3011bd1cd29f8f3841bf1b64d5ead9ed1434e8
tree6db5badedab31d10e4bbd19fbcc329f6ed649614
parentf32400e90c046a9fd76c8917a60d34ade9c02ea2
arm: fix build with gcc 7

The compiler dislikes duplicate "const", and the ones it complains
about look like they we in fact meant to be placed differently.

Also fix array_access_okay() (just like on x86), despite the construct
being unused on ARM: -Wint-in-bool-context, enabled by default in
gcc 7, doesn't like multiplication in conditional operators. "Hide" it,
at the risk of the next compiler version becoming smarter and
recognizing even that. (The hope is that added smartness then would
also better deal with legitimate cases like the one here.) The change
could have been done in access_ok(), but I think we better keep it at
the place the compiler is actually unhappy about.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/platforms/brcm.c
xen/arch/arm/platforms/rcar2.c
xen/include/asm-arm/guest_access.h